home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 9 / CDACTUAL9.iso / share / Dos / VARIOS / pascal / EGAVGA.SWG / 0008_Re: Mode 80x50 or whatever.pas < prev   
Encoding:
Pascal/Delphi Source File  |  1996-02-21  |  1.1 KB  |  33 lines

  1. {
  2. >How do I set those REALLY low-resolution modes which people keep on
  3. >using? i.e. 80x50, etc.  I can tell that the only real reason that most
  4. >scaling effects are so fast is because rather than doing it fullscreen in
  5. >320x200, they use something like 80x50 or so...
  6.  
  7. Correct, in the old days, anyway.  They usually were unchained
  8. modes with the cell height changed.  Changing the cell height makes
  9. every pixel twice as high, three times as high, etc.  They were
  10. unchained modes so you could change the write plane registers so
  11. when you wrote one pixel to the screen, it wrote four in a row.
  12. Voila, 80x50.
  13.  
  14. You can't do that because of the way you program (you're strictly
  15. mode 13h) but you *can* change the cell height, like this:
  16. }
  17.  
  18. Procedure cellheight(a:Byte);Assembler;
  19.   Asm
  20.     push    DX
  21.     mov     AH,a            {cell height is a}
  22.     mov     DX,$3D4         {CRTC_Index $3d4 }
  23.     mov     AL,9            {register function}
  24.     out     DX,AL           {do it!}
  25.     Inc     DL
  26.     In      AL,DX
  27.     And     AL,11100000b
  28.     Or      AL,AH
  29.     out     DX,AL           {do it!}
  30.     pop     DX
  31.   End;
  32.  
  33.